<template>
    <div>
<!--    <div class="shouchong">-->
<!--        <div class="shou-img">-->
<!--            <img src="./activity-img/recharge-banner.png">-->
<!--        </div>-->
<!--        <div class="shou-img2">-->
<!--            <img src="./activity-img/194b435547.png">-->
<!--        </div>-->
<!--        <a :href="productUrl(6)" class="zhing">点击充值</a>-->
<!--        <div class="tishi">1. 此充值为书币充值</div>-->
<!--        <div class="tishi">2. 书币为虚拟物品，不支持退货</div>-->
<!--        <div class="tishi">3. 此充值只限单次充值</div>-->
    </div>
</template>

<script>
    export default {
        name: "shou",
        data(){
            return{
                successUrl:encodeURIComponent( 'http://'+document.domain+'/index'),
                id: this.$route.query.id,
            }
        },
        created:function () {
            this.set();
        },
        mounted(){
            window.location.href = this.productUrl(this.id)
        },
        methods:{
            set:function(){
                this.$emit('set','hide')
            },
            productUrl(id) {
                let url = `/buy?ProductID=`+id+
                    `&SuccessRedirect=`+this.successUrl+
                    `&FailedRedirect=`+this.successUrl;
                return this.$axios.defaults.linkUrl(url);
            }
        }
    }
</script>

<style scoped>
    .shouchong{
        width: 100%;
        min-height: 100vh;
        background: url("./activity-img/c931ab44bd.png") no-repeat ;
        background-size: cover;
    }
    .shou-img{
        padding-top: 20px;
    }
    img{
        width: 100%;
    }
    .shou-img2{
        padding: 20px;
    }
    .zhing{
        display: block;
        width: 200px;
        height: 45px;
        margin: 0px auto 20px;
        background-color: #fff;
        border-radius: 22.5px;
        -webkit-box-shadow: 0 7px 27px 0 rgba(113,64,205,.38);
        box-shadow: 0 7px 27px 0 rgba(113,64,205,.38);
        color: #6b3ccb;
        font-size: 22.5px;
        letter-spacing: 1.5px;
        line-height: 45px;
        text-decoration: none;
        text-align: center;
    }
    .tishi{
        padding-top: 3px;
        color: #fff;
        font-size: 12px;
        letter-spacing: 1px;
        text-align: center;
    }
</style>